/**
* @file ExplosionReverbFilter.h
* @author Max Ocklind
* @version 2009-12-16
**/

#if !defined(EXPLOSIONREVERBFILTER_H)
#define EXPLOSIONREVERBFILTER_H

/* includes */

#include "SFXFilter.h"


/* classes */

class ExplosionReverbFilter : public SFXFilter
{
private:
	virtual void mFilter(SoundSource source);

public:
	ExplosionReverbFilter()
		: SFXFilter(1, 1, 0)
	{
		// set effect
		alEffecti(mEffects[0], AL_EFFECT_TYPE, AL_EFFECT_REVERB);
		errCheck->checkALError("ExplosionReverbFilter", "mFilter (reverb effect not supported)");
		
		// set effect properties
		alEffectf(mEffects[0], AL_REVERB_DECAY_TIME,		7.5f);	 // 0.1 - 20.0
		errCheck->checkALError("ExplosionReverbFilter", "mFilter (reverb decay time)");
		alEffectf(mEffects[0], AL_REVERB_REFLECTIONS_GAIN,	2.5f);	 // 0.0 - 3.16
		errCheck->checkALError("ExplosionReverbFilter", "mFilter (reverb reflections gain)");
		alEffectf(mEffects[0], AL_REVERB_REFLECTIONS_DELAY, 0.005f); // 0.0 - 0.3
		errCheck->checkALError("ExplosionReverbFilter", "mFilter (reverb reflections delay)");
		alEffectf(mEffects[0], AL_REVERB_LATE_REVERB_GAIN,	4.5f);	 // 0.0 - 10.0
		errCheck->checkALError("ExplosionReverbFilter", "mFilter (reverb late reverb gain)");
	}

}; /* ExplosionReverbFilter */

#endif /* EXPLOSIONREVERBFILTER_H */